#include <iostream>
#include <cstdio>
using namespace std;

typedef long long ll;

int main()
{
	int n;
	while (cin >> n)
	{
		ll ans = 0;
		if (n < 2)cout << ans << " " << "RANDOM" << endl;
		else
		{
			ll t[3005];
			t[0] = 0;
			/*ans = (n + 1) * n * (n - 1);
			ans /= 6;*/
			for (int i = 1; i < n; i++)
			{
				t[i] = t[i - 1] + i;
			}
			for (int i = 0; i < n; i++)
			{
				ans = ans + t[i];
			}
			cout << ans << " " << 3 * (n + 1) << endl;
		}
	}

	return 0;
}
